//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    //\\?[Obsolete]
    public class NonVisualGraphicFrameProperties : IOfficeXmlSerializable
    {
        private GraphicalObjectFrameLocking graphicFrameLocks;

        public GraphicalObjectFrameLocking GraphicalObjectFrameLocking
        {
            get { return graphicFrameLocks; }
            set { graphicFrameLocks = value; }
        }

        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (ReadContext c0 = context.Read("cNvGraphicFramePr"))
            {
                ReadContext c = c0; //\\ c0.SwitchNamespace(DrawingConstants.DrawingNamespace);
                GraphicalObjectFrameLocking = c.ReadOptionalElement<GraphicalObjectFrameLocking>("graphicFrameLocks");
                c.WarnIf("ext");
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write("cNvGraphicFramePr"))
            {
                c.WriteOptionalElement(GraphicalObjectFrameLocking);
                c.WarnIf("ext");
            }
        }

        #endregion
    }
}